export const throttle=(fn,time)=>{
    let timer
    return (...arg)=>{
        if(timer){
            return false
        }
        timer=setTimeout(()=>{
            fn(...arg)
            clearTimeout(timer)
            timer=null
        },time)
    }
}